3.2.78 \(\int \frac {(h+i x) (a+b \log (c (e+f x)))}{d e+d f x} \, dx\) [178]

Optimal. Leaf size=79 \[ \frac {a i x}{d f}-\frac {b i x}{d f}+\frac {b i (e+f x) \log (c (e+f x))}{d f^2}+\frac {(f h-e i) (a+b \log (c (e+f x)))^2}{2 b d f^2} \]

[Out]

a*i*x/d/f-b*i*x/d/f+b*i*(f*x+e)*ln(c*(f*x+e))/d/f^2+1/2*(-e*i+f*h)*(a+b*ln(c*(f*x+e)))^2/b/d/f^2

________________________________________________________________________________________

Rubi [A]
time = 0.09, antiderivative size = 79, normalized size of antiderivative = 1.00, number of steps used = 6, number of rules used = 5, integrand size = 28, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.179, Rules used = {2458, 12, 2388, 2338, 2332} \begin {gather*} \frac {(f h-e i) (a+b \log (c (e+f x)))^2}{2 b d f^2}+\frac {a i x}{d f}+\frac {b i (e+f x) \log (c (e+f x))}{d f^2}-\frac {b i x}{d f} \end {gather*}

Antiderivative was successfully verified.

[In]

Int[((h + i*x)*(a + b*Log[c*(e + f*x)]))/(d*e + d*f*x),x]

[Out]

(a*i*x)/(d*f) - (b*i*x)/(d*f) + (b*i*(e + f*x)*Log[c*(e + f*x)])/(d*f^2) + ((f*h - e*i)*(a + b*Log[c*(e + f*x)
])^2)/(2*b*d*f^2)

Rule 12

Int[(a_)*(u_), x_Symbol] :> Dist[a, Int[u, x], x] /; FreeQ[a, x] &&  !MatchQ[u, (b_)*(v_) /; FreeQ[b, x]]

Rule 2332

Int[Log[(c_.)*(x_)^(n_.)], x_Symbol] :> Simp[x*Log[c*x^n], x] - Simp[n*x, x] /; FreeQ[{c, n}, x]

Rule 2338

Int[((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))/(x_), x_Symbol] :> Simp[(a + b*Log[c*x^n])^2/(2*b*n), x] /; FreeQ[{a
, b, c, n}, x]

Rule 2388

Int[(((a_.) + Log[(c_.)*(x_)^(n_.)]*(b_.))^(p_.)*((d_) + (e_.)*(x_))^(q_.))/(x_), x_Symbol] :> Dist[d, Int[(d
+ e*x)^(q - 1)*((a + b*Log[c*x^n])^p/x), x], x] + Dist[e, Int[(d + e*x)^(q - 1)*(a + b*Log[c*x^n])^p, x], x] /
; FreeQ[{a, b, c, d, e, n}, x] && IGtQ[p, 0] && GtQ[q, 0] && IntegerQ[2*q]

Rule 2458

Int[((a_.) + Log[(c_.)*((d_) + (e_.)*(x_))^(n_.)]*(b_.))^(p_.)*((f_.) + (g_.)*(x_))^(q_.)*((h_.) + (i_.)*(x_))
^(r_.), x_Symbol] :> Dist[1/e, Subst[Int[(g*(x/e))^q*((e*h - d*i)/e + i*(x/e))^r*(a + b*Log[c*x^n])^p, x], x,
d + e*x], x] /; FreeQ[{a, b, c, d, e, f, g, h, i, n, p, q, r}, x] && EqQ[e*f - d*g, 0] && (IGtQ[p, 0] || IGtQ[
r, 0]) && IntegerQ[2*r]

Rubi steps

\begin {align*} \int \frac {(h+178 x) (a+b \log (c (e+f x)))}{d e+d f x} \, dx &=\frac {\text {Subst}\left (\int \frac {\left (\frac {-178 e+f h}{f}+\frac {178 x}{f}\right ) (a+b \log (c x))}{d x} \, dx,x,e+f x\right )}{f}\\ &=\frac {\text {Subst}\left (\int \frac {\left (\frac {-178 e+f h}{f}+\frac {178 x}{f}\right ) (a+b \log (c x))}{x} \, dx,x,e+f x\right )}{d f}\\ &=\frac {178 \text {Subst}(\int (a+b \log (c x)) \, dx,x,e+f x)}{d f^2}-\frac {(178 e-f h) \text {Subst}\left (\int \frac {a+b \log (c x)}{x} \, dx,x,e+f x\right )}{d f^2}\\ &=\frac {178 a x}{d f}-\frac {(178 e-f h) (a+b \log (c (e+f x)))^2}{2 b d f^2}+\frac {(178 b) \text {Subst}(\int \log (c x) \, dx,x,e+f x)}{d f^2}\\ &=\frac {178 a x}{d f}-\frac {178 b x}{d f}+\frac {178 b (e+f x) \log (c (e+f x))}{d f^2}-\frac {(178 e-f h) (a+b \log (c (e+f x)))^2}{2 b d f^2}\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]
time = 0.04, size = 66, normalized size = 0.84 \begin {gather*} \frac {2 a f i x-2 b f i x+2 b i (e+f x) \log (c (e+f x))+\frac {(f h-e i) (a+b \log (c (e+f x)))^2}{b}}{2 d f^2} \end {gather*}

Antiderivative was successfully verified.

[In]

Integrate[((h + i*x)*(a + b*Log[c*(e + f*x)]))/(d*e + d*f*x),x]

[Out]

(2*a*f*i*x - 2*b*f*i*x + 2*b*i*(e + f*x)*Log[c*(e + f*x)] + ((f*h - e*i)*(a + b*Log[c*(e + f*x)])^2)/b)/(2*d*f
^2)

________________________________________________________________________________________

Maple [A]
time = 0.39, size = 142, normalized size = 1.80

method result size
norman \(\frac {i \left (a -b \right ) x}{d f}+\frac {b i x \ln \left (c \left (f x +e \right )\right )}{d f}-\frac {\left (a e i -a f h -b e i \right ) \ln \left (c \left (f x +e \right )\right )}{d \,f^{2}}-\frac {b \left (e i -f h \right ) \ln \left (c \left (f x +e \right )\right )^{2}}{2 d \,f^{2}}\) \(92\)
risch \(-\frac {b \ln \left (c \left (f x +e \right )\right )^{2} e i}{2 d \,f^{2}}+\frac {b \ln \left (c \left (f x +e \right )\right )^{2} h}{2 d f}+\frac {b i x \ln \left (c \left (f x +e \right )\right )}{d f}-\frac {\ln \left (f x +e \right ) a e i}{d \,f^{2}}+\frac {\ln \left (f x +e \right ) a h}{d f}+\frac {\ln \left (f x +e \right ) b e i}{d \,f^{2}}+\frac {a i x}{d f}-\frac {b i x}{d f}\) \(130\)
derivativedivides \(\frac {-\frac {a c e i \ln \left (c f x +c e \right )}{f d}+\frac {a h c \ln \left (c f x +c e \right )}{d}+\frac {a i \left (c f x +c e \right )}{f d}-\frac {b c e i \ln \left (c f x +c e \right )^{2}}{2 f d}+\frac {b h c \ln \left (c f x +c e \right )^{2}}{2 d}+\frac {b i \left (\left (c f x +c e \right ) \ln \left (c f x +c e \right )-c f x -c e \right )}{f d}}{c f}\) \(142\)
default \(\frac {-\frac {a c e i \ln \left (c f x +c e \right )}{f d}+\frac {a h c \ln \left (c f x +c e \right )}{d}+\frac {a i \left (c f x +c e \right )}{f d}-\frac {b c e i \ln \left (c f x +c e \right )^{2}}{2 f d}+\frac {b h c \ln \left (c f x +c e \right )^{2}}{2 d}+\frac {b i \left (\left (c f x +c e \right ) \ln \left (c f x +c e \right )-c f x -c e \right )}{f d}}{c f}\) \(142\)

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((i*x+h)*(a+b*ln(c*(f*x+e)))/(d*f*x+d*e),x,method=_RETURNVERBOSE)

[Out]

1/c/f*(-1/f/d*a*c*e*i*ln(c*f*x+c*e)+1/d*a*h*c*ln(c*f*x+c*e)+1/f/d*a*i*(c*f*x+c*e)-1/2/f/d*b*c*e*i*ln(c*f*x+c*e
)^2+1/2/d*b*h*c*ln(c*f*x+c*e)^2+1/f/d*b*i*((c*f*x+c*e)*ln(c*f*x+c*e)-c*f*x-c*e))

________________________________________________________________________________________

Maxima [B] Both result and optimal contain complex but leaf count of result is larger than twice the leaf count of optimal. 216 vs. \(2 (79) = 158\).
time = 0.33, size = 216, normalized size = 2.73 \begin {gather*} -\frac {1}{2} \, b h {\left (\frac {2 \, \log \left (c f x + c e\right ) \log \left (d f x + d e\right )}{d f} - \frac {\log \left (f x + e\right )^{2} + 2 \, \log \left (f x + e\right ) \log \left (c\right )}{d f}\right )} + i \, b {\left (\frac {x}{d f} - \frac {e \log \left (f x + e\right )}{d f^{2}}\right )} \log \left (c f x + c e\right ) + i \, a {\left (\frac {x}{d f} - \frac {e \log \left (f x + e\right )}{d f^{2}}\right )} + \frac {b h \log \left (c f x + c e\right ) \log \left (d f x + d e\right )}{d f} + \frac {a h \log \left (d f x + d e\right )}{d f} + \frac {i \, {\left (e \log \left (f x + e\right )^{2} - 2 \, f x + 2 \, e \log \left (f x + e\right )\right )} b}{2 \, d f^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((i*x+h)*(a+b*log(c*(f*x+e)))/(d*f*x+d*e),x, algorithm="maxima")

[Out]

-1/2*b*h*(2*log(c*f*x + c*e)*log(d*f*x + d*e)/(d*f) - (log(f*x + e)^2 + 2*log(f*x + e)*log(c))/(d*f)) + I*b*(x
/(d*f) - e*log(f*x + e)/(d*f^2))*log(c*f*x + c*e) + I*a*(x/(d*f) - e*log(f*x + e)/(d*f^2)) + b*h*log(c*f*x + c
*e)*log(d*f*x + d*e)/(d*f) + a*h*log(d*f*x + d*e)/(d*f) + 1/2*I*(e*log(f*x + e)^2 - 2*f*x + 2*e*log(f*x + e))*
b/(d*f^2)

________________________________________________________________________________________

Fricas [A]
time = 0.38, size = 77, normalized size = 0.97 \begin {gather*} -\frac {2 \, {\left (-i \, a + i \, b\right )} f x - {\left (b f h - i \, b e\right )} \log \left (c f x + c e\right )^{2} - 2 \, {\left (a f h + i \, b f x - {\left (i \, a - i \, b\right )} e\right )} \log \left (c f x + c e\right )}{2 \, d f^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((i*x+h)*(a+b*log(c*(f*x+e)))/(d*f*x+d*e),x, algorithm="fricas")

[Out]

-1/2*(2*(-I*a + I*b)*f*x - (b*f*h - I*b*e)*log(c*f*x + c*e)^2 - 2*(a*f*h + I*b*f*x - (I*a - I*b)*e)*log(c*f*x
+ c*e))/(d*f^2)

________________________________________________________________________________________

Sympy [A]
time = 0.22, size = 85, normalized size = 1.08 \begin {gather*} \frac {b i x \log {\left (c \left (e + f x\right ) \right )}}{d f} + x \left (\frac {a i}{d f} - \frac {b i}{d f}\right ) + \frac {\left (- b e i + b f h\right ) \log {\left (c \left (e + f x\right ) \right )}^{2}}{2 d f^{2}} - \frac {\left (a e i - a f h - b e i\right ) \log {\left (e + f x \right )}}{d f^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((i*x+h)*(a+b*ln(c*(f*x+e)))/(d*f*x+d*e),x)

[Out]

b*i*x*log(c*(e + f*x))/(d*f) + x*(a*i/(d*f) - b*i/(d*f)) + (-b*e*i + b*f*h)*log(c*(e + f*x))**2/(2*d*f**2) - (
a*e*i - a*f*h - b*e*i)*log(e + f*x)/(d*f**2)

________________________________________________________________________________________

Giac [A]
time = 5.47, size = 103, normalized size = 1.30 \begin {gather*} \frac {b f h \log \left (c f x + c e\right )^{2} + 2 i \, b f x \log \left (c f x + c e\right ) - i \, b e \log \left (c f x + c e\right )^{2} + 2 \, a f h \log \left (f x + e\right ) + 2 i \, a f x - 2 i \, b f x - 2 i \, a e \log \left (f x + e\right ) + 2 i \, b e \log \left (f x + e\right )}{2 \, d f^{2}} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((i*x+h)*(a+b*log(c*(f*x+e)))/(d*f*x+d*e),x, algorithm="giac")

[Out]

1/2*(b*f*h*log(c*f*x + c*e)^2 + 2*I*b*f*x*log(c*f*x + c*e) - I*b*e*log(c*f*x + c*e)^2 + 2*a*f*h*log(f*x + e) +
 2*I*a*f*x - 2*I*b*f*x - 2*I*a*e*log(f*x + e) + 2*I*b*e*log(f*x + e))/(d*f^2)

________________________________________________________________________________________

Mupad [B]
time = 0.64, size = 100, normalized size = 1.27 \begin {gather*} \frac {2\,a\,f\,i\,x-2\,b\,f\,i\,x-b\,e\,i\,{\ln \left (c\,e+c\,f\,x\right )}^2+b\,f\,h\,{\ln \left (c\,e+c\,f\,x\right )}^2-2\,a\,e\,i\,\ln \left (e+f\,x\right )+2\,a\,f\,h\,\ln \left (e+f\,x\right )+2\,b\,e\,i\,\ln \left (e+f\,x\right )+2\,b\,f\,i\,x\,\ln \left (c\,e+c\,f\,x\right )}{2\,d\,f^2} \end {gather*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(((h + i*x)*(a + b*log(c*(e + f*x))))/(d*e + d*f*x),x)

[Out]

(2*a*f*i*x - 2*b*f*i*x - b*e*i*log(c*e + c*f*x)^2 + b*f*h*log(c*e + c*f*x)^2 - 2*a*e*i*log(e + f*x) + 2*a*f*h*
log(e + f*x) + 2*b*e*i*log(e + f*x) + 2*b*f*i*x*log(c*e + c*f*x))/(2*d*f^2)

________________________________________________________________________________________